package com.zc.topmod.enumer;

/**
 * @ClassName RoadGradeEnum
 * @Description 道路等级
 * @Author zhucan
 * @Date 2019/01/31
 * @Version 1.0.0
 */

public enum RoadGradeEnum {

    HIGH_SPEED_ROAD("0", "高速道路"),
    FIRST_CLASS_ROAD("1", "一级道路"),
    OTHER_GRADE_ROADS("2", "其他等级道路"),
    ;
    private String key;
    private String value;

    private RoadGradeEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(String key) {
        for (RoadGradeEnum enumer : RoadGradeEnum.values()) {
            if (enumer.getKey() == key) {
                return enumer.getValue();
            }
        }
        return null;
    }
}
